package com.yifushidai.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import javax.persistence.*;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_ic_bind")
public class IcBind {
    @Id
    private Long id;

    private String mac;

    /**
     * 卡id 从服务端查询卡可见序号No.
     */
    @Column(name = "ic_id")
    private String icId;

    /**
     * 绑定卡号 由App传给服务器，解密后的卡号明文
     */
    @Column(name = "ic_no")
    private String icNo;

    /**
     * 绑定卡种类   0：房东卡   1：用户卡1    2：用户卡2
     */
    @Column(name = "ic_type")
    private String icType;

    /**
     * 创建时间
     */
    @Column(name = "create_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;

    /**
     * 更新时间
     */
    @Column(name = "update_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;

    /**
     * 失效时间
     */
    @Column(name = "expire_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expireDate;

    /**
     * 备注
     */
    private String mark;
}